package aircraft_war;

import aircraft_war.BasicClass;
import aircraft_war.Main;

import java.awt.image.BufferedImage;

public class Boss extends BasicClass implements AddScore{
    int speed;
    int score;

    int count;
    BufferedImage[] imgs={Main.boss0,Main.boss1};
    /*public void moveTo(int x,int y){
        this.x = x - width/2;
        this.y = y - height/2;
    }*/
    @Override
    public void move() {
        count++;
        if (count%4==0){
            this.img=imgs[1];
        }
        else{
            this.img=imgs[0];
        }
        y+=speed;

    }

    public Boss(){
        img=Main.boss0;
        speed=3;
        score=1000;
        width=img.getWidth();
        height=img.getHeight();
        blood=21;
        x=(int)(Math.random()*(Main.WIDTH-width));
        y=-height;
        //y=30;
    }

    @Override
    public int addScore() {
        return score;
    }

}
